"""
_*_ : utf-8 _*_ 
@Time: 2023/10/29 22:18
@Author: LWK
@File: 036_元组操作
@Project: demo01
"""
# 元组不可修改、不可删除，只可以查看
city_tuple = ('北京', '上海', '广州')
for city in city_tuple:
    print(city)

print('首都是%s' % city_tuple[0])

num_tuple = (1, 2)
print(type(num_tuple))

# 定义的元组如果只有一个元素，需要加一个逗号(1,)，否则只是声明了一个普通的变量
num_tuple2 = (1)
print(type(num_tuple2))